cmake_minimum_required(VERSION 3.15)

project(QHDF5)

# QT env configuration
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(QT NAMES Qt5 COMPONENTS 
    Core 
    Network
    REQUIRED
)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS 
    Core 
    Network
    REQUIRED
)

# 因为通过add_subdirectory的方式添加第三方库，所以不用find_package
find_package(Boost REQUIRED)

add_library(QHDF5 STATIC

)
add_library(utils::QHDF5 ALIAS QHDF5 )

target_include_directories(QHDF5 
    PUBLIC
    Boost
)
target_link_libraries(QHDF5 
    PUBLIC
    Boost
)

add_subdirectory(example)